import hashlib

def main():
    machine_code = input("请输入FinalShell的离线机器码：")
    generate_key(machine_code)

def generate_key(hardware_id):
    pro_key = transform(str(61305) + hardware_id + str(8552))
    pf_key = transform(str(2356) + hardware_id + str(13593))
    print("请将此行复制到离线激活中-高级版：" + pro_key)
    print("请将此行复制到离线激活中-专业版：" + pf_key)

def transform(s):
    md5 = hash_md5(s)
    return md5[8:24]

def hash_md5(s):
    m = hashlib.md5()
    m.update(s.encode('utf-8'))
    return m.hexdigest()

if __name__ == "__main__":
    main()